// 存放一些组件默认配置
import type { FormProps, ModalProps, TableProps } from 'ant-design-vue';

export const defaultTableProps: TableProps = {
  transformCellText({ text }) {
    if (!text || (Array.isArray(text) && text.length === 0)) {
      return '-';
    }
    return text;
  },
  rowKey: 'id',
  customRow() {
    return {
        class: "table-row-cls"
    }
  },
  customHeaderRow() {
    return {
        class: "table-header-row-cls"
    }
  }
};
export const defaultModalProps: ModalProps = {
  centered: true
}
export const defaultFormProps: FormProps = {
  hideRequiredMark: true,
  requiredMark: false,
  colon: false,
  labelAlign: "right",
}
export const defaultMapProps = {
  ak: 'AYNXtvwE28ELvGsl5Mi8crhrHzzHcqCv', // 'OlGzoCwcKN9OvM16T9RnFwOl',
  type: 'API',
  v: '2.0',
  scrollWheelZoom: true,
  zoom: 15,
};

/** 默认北京 */
export const defCenter = {
  lng: 116.404,
  lat: 39.915,
};